/*! For license information please see 5783.574c15bd46f0b9351338.js.LICENSE.txt */ "use strict";(self.webpackChunkwebpack_frontend=self.webpackChunkwebpack_frontend||[]).push([[5783],{15783:(t,e,r)=>{r.d(e,{A:()=>n});const n=r(58626).A},53390:(t,e,r)=>{r.d(e,{A:()=>m});r(52675),r(89463),r(2259),r(45700),r(89572),r(2892),r(84185),r(51629),r(23792),r(26099),r(47764),r(73772),r(23500),r(62953);var n,o=r(30200),i=r(37045);r(84634);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var r=0;r{r.d(e,{A:()=>q});r(2008),r(51629),r(23792),r(26099),r(3362),r(27495),r(47764),r(5746),r(23500),r(62953);var n=r(25106),o=r(84634),i=r(9871),a=r(57356),u=(r(52675),r(89463),r(66412),r(2259),r(45700),r(78125),r(28706),r(50113),r(74423),r(94490),r(34782),r(60739),r(89572),r(23288),r(94170),r(62010),r(4731),r(60479),r(2892),r(59904),r(67945),r(84185),r(83851),r(81278),r(40875),r(79432),r(10287),r(60825),r(21699),r(25440),r(73772),r(76031),r(3223)),c=r(84786),s=r(57767),l=r(10245),f=r(33498),p=r(53448),h=r(55535),d=r(5280),m=r(30200),y=r(61219),v=r(1598),g=r(33532),b=r(53390),w=r(74692);function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function T(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:x(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function S(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function O(t,e){for(var r=0;r0&&void 0!==c[0]?c[0]:"",r=function(){switch(u.state.mutationType){case u.mutationTypes.phone:return u.mutationNames.phone;case u.mutationTypes.fast:return u.mutationNames.fast;default:return u.mutationNames.email}},n=this._getMutationArguments(),i=r(),e&&(n.gCaptchaResponse=e),t.next=7,(0,l.A)().mutate({mutation:(0,l.$)(i),variables:n,fetchPolicy:"no-cache"}).then((function(t){return t.data[i]})).catch((function(t){return!(0,o.KV)()&&console.error(t),u._errorHandler(t.graphQLErrors[0]),(0,p.Dv)(u.submitButton),null}));case 7:(a=t.sent)&&(this.isFastTabSelected(this.state.mutationType)&&(a.mutationType=this.mutationTypes.fast),this._successHandler(a,n.crmAuthHash));case 9:case"end":return t.stop()}}),t,this)})),k=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=T.apply(t,e);function i(t){S(o,r,n,i,a,"next",t)}function a(t){S(o,r,n,i,a,"throw",t)}i(void 0)}))},function(){return k.apply(this,arguments)})},{key:"_getMutationArguments",value:function(){var t=window.registrationCurrenciesList,e=(0,o.Ri)("id"),r=(0,o.Ri)("rec_sum"),n=g.A.getParam(g.A.MCRSUM_PARAM_NAME),i=g.A.getParam(g.A.MCMD_PARAM_NAME),a=(0,o.Ri)("sign"),u=(0,o.Ri)("xAppName"),c=(0,o.Ri)("xAppToken"),s=(0,o.Ri)("xDeviceId"),l=this.CustomSelect&&this.CustomSelect.selectedItemValue||1===(null==t?void 0:t.length)&&t[0],f=(0,o.Ri)("pmeth"),p=(0,o.Ri)("x_mob_app_data"),h=(0,o.Ri)("min-dep");h=h&&Number(h);var m=(0,o.Ri)("registrationBonusId");m=m&&Number(m);var y=(0,o.Ri)("app_install_uuid"),v=this._getCurrentFormData(),b=(0,o.Ri)("crm_auth_hash"),w=d.A.getPath(),_=(0,o.JK)(),T={};switch(this.state.mutationType){case this.mutationTypes.phone:T.phone=this._getPhoneValue(v.login),T.password=v.password.value;break;case this.mutationTypes.fast:T.registrationMethod="fast";break;default:T.email=v.login.value,T.password=v.password.value}b&&(T.crmAuthHash=b);var A=E(E({},T),{},{locale:_.includes("-")?_.replace("-","_").toUpperCase():_.toUpperCase(),platformType:(0,o.mw)(),platform:(0,o.uo)(),subscribeOnEmailNotifications:!0,refCode:(0,o.Ri)("refCode")||"",affData:(0,o.Ri)("aff_data_cookie")||"",registrationBonusId:m||0,marketingUuid:(0,o.Ri)("marketing_uuid")||"",uuid:(0,o.Ri)("_user_uuid")||"",pushSubscriptionData:p,appInstallUuid:y,landingPageUrl:w});return isNaN(h)||(A.minDeposit=h),l&&(A.currencyCode=l),f&&(A.paySystemsGroup=f),e&&a&&(A.dcId=(0,o.Ri)("id"),A.dcSign=(0,o.Ri)("sign")),u&&c&&(A.pushSubscriptionData=JSON.stringify({xAppName:u,xAppToken:c,xDeviceId:s})),r&&(A.recommendedSum=r),n&&(A.mcRecommendedSum=n),i&&(A.mcMinDeposit=i),A}},{key:"_getCurrentFormData",value:function(){return this.isPhoneTabSelected(this.state.mutationType)?this.phoneFields:this.emailFields}},{key:"_getPhoneValue",value:function(t){return m.Ay.getFullPhoneNumber(t)}},{key:"_getEmailWhiteList",value:function(){var t=this;(0,l.A)().query({query:(0,l.$)("emailDomainsWhiteList"),fetchPolicy:"network-only"}).then((function(e){var r=e.data.emailDomainsWhiteList;if(!r.length)return t.emailDomainsWhiteList=[],t;t.emailDomainsWhiteList=r}))}},{key:"_attachEvents",value:function(){var t=this;this.emailField.addEventListener("blur",(function(){var e=t.emailField.value;if(""!==e&&v.A.isCorrectEmail(e)&&t.emailDomainsWhiteList.length){var r=e.split("@")[1];t.emailDomainsWhiteList.find((function(t){return t===r}))||u.A.addErrorToElement(t.emailField,(0,y.trans)(y.transConstant.WARNING_REGISTRATION_EMAIL),!0)}})),this.form.addEventListener("submit",(function(e){if(e.preventDefault(),(0,p.Q_)(t.submitButton),!u.A.validateForm(t.form)||t.isBlockedUser)return!1;0!==Object.keys(t.captchaData).length&&t.captchaData.enabled?i.q.render(t.submitButton,t.captchaData.captchaId,t.form.id,(function(e){var r=e.token;t._sendForm(r)})).execute(t.form.id):t._sendForm()})),document.addEventListener(b.A.AUTH_TABS_TRIGGER,(function(e){t.state.mutationType=t.mutationTypes[e.detail.activeTab],t.changeActiveInputField(t.state.mutationType)}))}}],a&&O(n.prototype,a),_&&O(n,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,_,T,k}(b.A);var F=r(74692);function G(t){var e=t.trackAuthAnalytics,r=t.trackTools,n=t.trackConstant,o=t.trackApi;F(document).one("input","#popup-form-register input:input",(function(){r.setActionTimer(n.REG_INPUT_TIME)})),e(n.popupReg(o))}const q={hash:"#popup-reg",url:window.location.search?"/get-registration-form/".concat(window.location.search):"/get-registration-form/",handler:function(t){(0,i.A)(i.q.type.reg).then((function(t){new D(t)})),(0,a.A)().then((function(){a.C.customInit(".popup [login-data]")})),(0,n.A)("#fos_user_registration_form_plainPassword"),(0,n.A)("#sign-up-phone-password"),(0,o.z1)("[data-registration-bonuses]").then((function(t){return t&&r.e(6141).then(r.bind(r,36141))})).then(o.W5),(0,o.z1)("[data-registration-bonus-by-ref-code]").then((function(t){return t&&r.e(2427).then(r.bind(r,82427))})).then(o.W5),function(){if((0,o.zL)()){var t=document.querySelectorAll("[data-form-reg-with-tooltip]");if(t){var e="[data-form-reg-tooltip]",r=document.querySelectorAll(e),n=document.querySelectorAll("[data-popup-tabs-name]"),i="popup-auth__tooltip--visible-hint";r.forEach((function(t){return t.addEventListener("click",(function(e){e.stopPropagation(),t.classList.toggle(i)}))})),t.forEach((function(t){var r=0;t.addEventListener("click",(function(){var n;++r<2&&(null===(n=t.querySelector(e))||void 0===n||n.classList.add("popup-auth__tooltip--visible-icon",i))})),t.querySelectorAll("input[type=email], input[type=tel]").forEach((function(r){r.addEventListener("blur",(function(){var r;null===(r=t.querySelector(e))||void 0===r||r.classList.remove(i)}))}))})),n.forEach((function(t){t.addEventListener("click",(function(){r.forEach((function(t){return t.classList.remove(i)}))}))}))}}else{var a=F("[data-form-reg-tooltip]");if(a.length){var u=0;F(".tooltip").on("click",(function(t){t.stopPropagation(),F(this).closest("[data-form-reg-tooltip]").toggleClass("active-hint")})),a.on("click",(function(){++u<2&&F(this).addClass("active-icon active-hint")})),F(document).on("blur","[data-form-reg-tooltip]",(function(){F(this).removeClass("active-hint")})),F(document).on("click",".popup-tabs__item",(function(){a.removeClass("active-hint")})),o.T.isSafari()&&F("[autofocus]").filter(":last").focus()}}}();var e='[data-popup="header"] [data-lang-switcher-wrap]';(0,o.z1)(e).then((function(t){t&&r.e(956).then(r.bind(r,60956)).then((function(t){return t&&t.default(e)}))})),Promise.resolve().then(r.bind(r,57767)).then(G),b.A.authorizationPopupsTabsHandler(),t&&t()}}}}]);